import requests

url = "https://api.openweathermap.org/data/2.5/weather"

params = {
    "q": "Jinan",
    "appid": "ec4181a84c004c5e1968c365355af7e6"
}

# response = requests.get(url, params=params)
response = requests.post(url, params=params)
#  上面 这两行的作用是一样的 注意理解API的运行原理
data = response.json()

print(data)

